<#-- 生成为表常量对象实现 -->
package ${moduleName}.entity.cons;

/**
* ${tableInfo.simpleRemark}常量对象实现
*
* @author auto
* @version 1.0.0 ${today}
*/
public class ${tableInfo.firstUpperCase}Cons{
<#if tableInfo.fieldInfos?? && tableInfo.fieldInfos?size gt 0>
    <#list tableInfo.fieldInfos as fieldInfo>
    <#if fieldInfo.remark?split("、")?size gt 1>

	public enum  ${fieldInfo.upperColName}   {

	    <#list fieldInfo.remark?split("\n") as s>
                /**${s?split("、")[1]}*/
	    		${s?split("、")[2]}(${s?split("、")[0]},"${s?split("、")[1]}"),
		</#list>
		;
        public  Integer code;
        public String msg;

        public final static String HASH_MAPS = JSONObject.toJSONString(Arrays.stream(${fieldInfo.upperColName}.values()).map(e -> new HashMap<String, Object>() {{
                    put("label", e.msg);
                    put("value", e);
                }}
        ).collect(Collectors.toList()));


        ${fieldInfo.upperColName}(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public static String codeMsg(Integer code) {
            for (${fieldInfo.upperColName} k : ${fieldInfo.upperColName}.values()) {
                if (k.code.equals(code)) {
                    return k.msg;
                }
            }
            return null;
        }

	}
	</#if>
    </#list>
</#if>
}


